package com.iknow.db;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import com.iknow.QingboResponse;
import com.iknow.User;
import com.iknow.data.MessageSesstion;
import com.iknow.data.QingBo;
import com.iknow.data.QingboType;
import com.iknow.data.SubscribeTag;
import com.iknow.data.Word;
import com.iknow.util.Loger;
import com.iknow.util.StringUtil;
import com.iknow.xmpp.service.AudioMessage;
import com.iknow.xmpp.service.Contact;
import com.iknow.xmpp.service.Friend;
import com.iknow.xmpp.service.ImageMessage;
import com.iknow.xmpp.service.Message;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import org.jivesoftware.smack.packet.RosterPacket.ItemType;
import org.jivesoftware.smack.util.StringUtils;

public class IKnowDataBase
{
  private final int MAX_COUNT;
  private final int MAX_DELTE_COUNT;
  private final String TAG = "IKnowDataBase";
  public Context ctx;
  private IKnowDatabaseHelper mDBHepler;

  public IKnowDataBase(Context paramContext)
  {
    this.MAX_COUNT = 512;
    this.MAX_DELTE_COUNT = 100;
    this.ctx = null;
    this.mDBHepler = new IKnowDatabaseHelper(paramContext);
    this.ctx = paramContext;
  }

  private ContentValues getContentValues(int paramInt, String paramString1, String paramString2, String paramString3, boolean paramBoolean, Date paramDate)
  {
    ContentValues localContentValues = new ContentValues();
    int i = 1 + getTotalCount(paramString3);
    int j = getUnreadCount(paramString3);
    if (!(paramBoolean))
      ++j;
    localContentValues.put("user_id", paramString2);
    localContentValues.put("roster_id", paramString3);
    localContentValues.put("subject", paramString1);
    localContentValues.put("date", Long.valueOf(paramDate.getTime()));
    localContentValues.put("iknow_type", String.valueOf(paramInt));
    localContentValues.put("total", String.valueOf(i));
    localContentValues.put("unread_count", String.valueOf(j));
    return localContentValues;
  }

  private ContentValues getFriendContentValues(Friend paramFriend)
  {
    ContentValues localContentValues = new ContentValues();
    localContentValues.put("jid", paramFriend.getID());
    localContentValues.put("name", paramFriend.getName());
    localContentValues.put("avatar", paramFriend.getImageUrl());
    localContentValues.put("flag", paramFriend.getTags());
    localContentValues.put("qingbo_count", paramFriend.getQingboCount());
    localContentValues.put("roster_count", paramFriend.getRosterCount());
    localContentValues.put("sex", paramFriend.getGender());
    localContentValues.put("career", "");
    localContentValues.put("description", paramFriend.getDes());
    localContentValues.put("signature", paramFriend.getSignature());
    localContentValues.put("favorite_count", paramFriend.getFavCount());
    localContentValues.put("word_count", paramFriend.getWordCount());
    localContentValues.put("longitude", String.valueOf(paramFriend.getLongitude()));
    localContentValues.put("latitude", String.valueOf(paramFriend.getLatitude()));
    return localContentValues;
  }

  private ContentValues getMsgContentValues(Message paramMessage, String paramString)
  {
    ContentValues localContentValues = new ContentValues();
    localContentValues.put("thread", paramMessage.getThread());
    localContentValues.put("type", String.valueOf(paramMessage.getType()));
    localContentValues.put("subject", paramMessage.getSubject());
    localContentValues.put("body", paramMessage.getBody());
    localContentValues.put("msgfrom", StringUtils.parseBareAddress(paramMessage.getFrom()));
    localContentValues.put("msgto", StringUtils.parseBareAddress(paramMessage.getTo()));
    localContentValues.put("msgtime", Long.valueOf(paramMessage.getTimestamp().getTime()));
    localContentValues.put("loc_time", Long.valueOf(System.currentTimeMillis()));
    localContentValues.put("isRead", paramString);
    localContentValues.put("status", Integer.valueOf(paramMessage.getStatus()));
    if (paramMessage instanceof ImageMessage)
      localContentValues.put("source", ((ImageMessage)paramMessage).getFileName());
    while (true)
    {
      do
      {
        localContentValues.put("iknowType", Integer.valueOf(paramMessage.getiKnowType()));
        return localContentValues;
      }
      while (!(paramMessage instanceof AudioMessage));
      localContentValues.put("source", ((AudioMessage)paramMessage).getFileName());
    }
  }

  private ContentValues getQingboContentValues(QingboResponse paramQingboResponse, int paramInt)
  {
    ContentValues localContentValues = new ContentValues();
    localContentValues.put("id", paramQingboResponse.getID());
    localContentValues.put("date", Long.valueOf(paramQingboResponse.getCreateTime().getTime()));
    localContentValues.put("subject", paramQingboResponse.getSubject());
    localContentValues.put("title", paramQingboResponse.getTitle());
    localContentValues.put("hot", paramQingboResponse.getHot());
    localContentValues.put("favorite_count", paramQingboResponse.getFavoriteCount());
    localContentValues.put("comment_count", paramQingboResponse.getCommentCount());
    localContentValues.put("type", paramQingboResponse.getType().toString());
    localContentValues.put("thumbnail_url", paramQingboResponse.getThumbnailUrl());
    localContentValues.put("jid", paramQingboResponse.getAuthorID());
    localContentValues.put("user_name", paramQingboResponse.getAuthorName());
    localContentValues.put("tag", paramQingboResponse.getTags());
    localContentValues.put("page_type", String.valueOf(paramInt));
    return localContentValues;
  }

  private ContentValues getQingboContentValues(QingBo paramQingBo, int paramInt)
  {
    ContentValues localContentValues = new ContentValues();
    localContentValues.put("id", paramQingBo.getID());
    localContentValues.put("date", Long.valueOf(paramQingBo.getCreateTime().getTime()));
    localContentValues.put("subject", paramQingBo.getSubject());
    localContentValues.put("title", paramQingBo.getTitle());
    localContentValues.put("hot", paramQingBo.getHot());
    localContentValues.put("favorite_count", paramQingBo.getFavoriteCount());
    localContentValues.put("comment_count", paramQingBo.getCommentCount());
    localContentValues.put("type", paramQingBo.getType().toString());
    localContentValues.put("thumbnail_url", paramQingBo.getThumbnailUrl());
    localContentValues.put("jid", paramQingBo.getAuthorID());
    localContentValues.put("user_name", paramQingBo.getAuthorName());
    localContentValues.put("tag", paramQingBo.getTags());
    localContentValues.put("page_type", String.valueOf(paramInt));
    return localContentValues;
  }

  private long getQingboDate(String paramString)
  {
    long l = 0L;
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(paramString, null);
    if (localCursor.getCount() > 0)
    {
      localCursor.moveToNext();
      l = localCursor.getLong(0);
    }
    localCursor.close();
    return l;
  }

  private ContentValues getRosterItemContentValues(String paramString1, String paramString2, int paramInt1, int paramInt2)
  {
    ContentValues localContentValues = new ContentValues();
    localContentValues.put("jid", paramString1);
    localContentValues.put("name", paramString2);
    localContentValues.put("subscribe_mode", Integer.valueOf(paramInt1));
    localContentValues.put("presence", Integer.valueOf(paramInt2));
    return localContentValues;
  }

  private ContentValues getTagContentValues(SubscribeTag paramSubscribeTag, String paramString)
  {
    ContentValues localContentValues = new ContentValues();
    localContentValues.put("user_id", paramString);
    localContentValues.put("tag_name", paramSubscribeTag.getTagName());
    localContentValues.put("system_flag", paramSubscribeTag.getSystemTag());
    return localContentValues;
  }

  private ContentValues getUserContentValues(User paramUser)
  {
    ContentValues localContentValues = new ContentValues();
    localContentValues.put("uid", paramUser.getUID());
    localContentValues.put("nick", paramUser.getNick());
    localContentValues.put("email", paramUser.getEmail());
    localContentValues.put("password", paramUser.getPassword());
    localContentValues.put("description", paramUser.getIntroduction());
    localContentValues.put("signature", paramUser.getSignature());
    localContentValues.put("image_id", paramUser.getImageId());
    localContentValues.put("gender", paramUser.getGender());
    return localContentValues;
  }

  private ContentValues getWordContentValues(Word paramWord)
  {
    ContentValues localContentValues = new ContentValues();
    localContentValues.put("user_id", paramWord.getUserId());
    localContentValues.put("key", paramWord.getKey());
    localContentValues.put("type", paramWord.getLang());
    localContentValues.put("memo", paramWord.getMemo());
    localContentValues.put("audioUrl", paramWord.getAudioUrl());
    localContentValues.put("pron", paramWord.getPron());
    localContentValues.put("def", paramWord.getDef());
    localContentValues.put("description", "");
    localContentValues.put("familiarity", "");
    localContentValues.put("lang", paramWord.getLang());
    if (paramWord.getCreateDate() != null)
      localContentValues.put("date", StringUtil.DateToStr(paramWord.getCreateDate()));
    while (true)
    {
      return localContentValues;
      localContentValues.put("date", StringUtil.DateToStr(new Date()));
    }
  }

  private boolean isSessionExist(String paramString)
  {
    int i = 0;
    Object[] arrayOfObject = new Object[4];
    arrayOfObject[0] = "subject";
    arrayOfObject[1] = "session";
    arrayOfObject[2] = "roster_id";
    arrayOfObject[3] = paramString;
    String str = String.format("select %s from %s where %s='%s'", arrayOfObject);
    try
    {
      Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
      if (localCursor.getCount() > 0)
        i = 1;
      localCursor.close();
      return i;
    }
    catch (Exception localException)
    {
      Loger.e("SessionTable", localException.getMessage());
    }
  }

  public void SubscribeQingbo(String paramString, boolean paramBoolean)
  {
    int i = 0;
    if (paramBoolean)
      i = 1;
    Object[] arrayOfObject = new Object[5];
    arrayOfObject[0] = "subscribe_qingbo";
    arrayOfObject[1] = "subscribe_flag";
    arrayOfObject[2] = Integer.valueOf(i);
    arrayOfObject[3] = "tag";
    arrayOfObject[4] = paramString;
    String str = String.format("update %s set %s=%d where %s='%s'", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void addFavoriteQingbo(List<QingboResponse> paramList)
  {
    if (paramList == null)
      return;
    int i = 0;
    while (true)
    {
      QingboResponse localQingboResponse;
      do
      {
        if (i >= paramList.size());
        localQingboResponse = (QingboResponse)paramList.get(i);
      }
      while (localQingboResponse == null);
      this.mDBHepler.getWritableDatabase().insert("favorite", null, getQingboContentValues(localQingboResponse, 4));
      ++i;
    }
  }

  public boolean addFavoriteQingbo(QingBo paramQingBo)
  {
    int i;
    if (-1L == this.mDBHepler.getWritableDatabase().insert("favorite", null, getQingboContentValues(paramQingBo, 4)))
    {
      Loger.d("QingboTable", "ADD MESSAGE FAIL!!!");
      i = 0;
    }
    while (true)
    {
      return i;
      i = 1;
    }
  }

  public void addFriend(Contact paramContact, RosterPacket.ItemType paramItemType)
  {
    if (paramContact == null);
    while (true)
    {
      return;
      addFriend(new Friend(paramContact));
    }
  }

  public void addFriend(Friend paramFriend)
  {
    if (-1L == this.mDBHepler.getWritableDatabase().insert("roster", null, getFriendContentValues(paramFriend)))
      Loger.d("QingboTable", "ADD MESSAGE FAIL!!!");
  }

  public void addMessage(Message paramMessage, String paramString)
  {
    if (-1L == this.mDBHepler.getWritableDatabase().insert("XmppMessage", null, getMsgContentValues(paramMessage, paramString)))
      Loger.d("MessageTable", "ADD MESSAGE FAIL!!!");
  }

  public void addNearByFriend(Friend paramFriend)
  {
    if (-1L == this.mDBHepler.getWritableDatabase().insert("near_by_friends", null, getFriendContentValues(paramFriend)))
      Loger.d("QingboTable", "ADD MESSAGE FAIL!!!");
  }

  public void addQingbo(QingBo paramQingBo, int paramInt, String paramString)
  {
    if (isQingBoExist(paramQingBo.getID(), paramInt, paramString))
      deleteQingBo(paramQingBo.getID(), paramInt, paramString);
    if (-1L == this.mDBHepler.getWritableDatabase().insert(paramString, null, getQingboContentValues(paramQingBo, paramInt)))
      Loger.d("QingboTable", "ADD MESSAGE FAIL!!!");
  }

  public void addRosterItem(String paramString1, String paramString2, int paramInt1, int paramInt2)
  {
    if (-1L == this.mDBHepler.getWritableDatabase().insert("xmpp_roster", null, getRosterItemContentValues(paramString1, paramString2, paramInt1, paramInt2)))
      Loger.d("XmppRosterTable", "ADD XmppRosterTable FAIL!!!");
  }

  public void addSession(int paramInt, String paramString1, String paramString2, String paramString3, boolean paramBoolean, Date paramDate)
  {
    if (isSessionExist(paramString3))
      updateSession(paramInt, paramString1, paramString2, paramString3, paramBoolean, paramDate);
    while (true)
    {
      ContentValues localContentValues;
      do
      {
        return;
        localContentValues = getContentValues(paramInt, paramString1, paramString2, paramString3, paramBoolean, paramDate);
      }
      while (-1L != this.mDBHepler.getWritableDatabase().insert("session", null, localContentValues));
      Loger.e("IKnowDataBase", "insert table session error:" + localContentValues.toString());
    }
  }

  public void addSubscribeTag(SubscribeTag paramSubscribeTag, String paramString)
  {
    if (-1L == this.mDBHepler.getWritableDatabase().insert("subscribe_tag", null, getTagContentValues(paramSubscribeTag, paramString)))
      Loger.d("MessageTable", "ADD MESSAGE FAIL!!!");
    while (true)
    {
      return;
      SubscribeQingbo(paramSubscribeTag.getTagName(), true);
    }
  }

  public void addUser(User paramUser)
  {
    if (-1L == this.mDBHepler.getWritableDatabase().insert("iKnowUser", null, getUserContentValues(paramUser)))
      Loger.d("QingboTable", "ADD MESSAGE FAIL!!!");
  }

  public void addWord(Word paramWord, String paramString)
  {
    paramWord.setWordMemo(paramString);
    if (-1L == this.mDBHepler.getWritableDatabase().insert("T_BD_STRANGEWORD", null, getWordContentValues(paramWord)))
      Loger.d("IKStrangeWordTable", "ADD MESSAGE FAIL!!!");
  }

  // ERROR //
  public void addWord(List<Word> paramList)
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_2
    //   2: aload_1
    //   3: ifnonnull +4 -> 7
    //   6: return
    //   7: aload_1
    //   8: invokeinterface 491 1 0
    //   13: ifeq -7 -> 6
    //   16: aload_0
    //   17: getfield 34	com/iknow/db/IKnowDataBase:mDBHepler	Lcom/iknow/db/IKnowDatabaseHelper;
    //   20: invokevirtual 480	com/iknow/db/IKnowDatabaseHelper:getWritableDatabase	()Landroid/database/sqlite/SQLiteDatabase;
    //   23: astore 5
    //   25: aload 5
    //   27: astore_2
    //   28: aload_2
    //   29: ifnonnull +18 -> 47
    //   32: aload_2
    //   33: ifnull -27 -> 6
    //   36: aload_2
    //   37: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   40: aload_2
    //   41: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   44: goto -38 -> 6
    //   47: aload_2
    //   48: invokevirtual 611	android/database/sqlite/SQLiteDatabase:beginTransaction	()V
    //   51: iconst_0
    //   52: istore 6
    //   54: iload 6
    //   56: aload_1
    //   57: invokeinterface 491 1 0
    //   62: if_icmplt +22 -> 84
    //   65: aload_2
    //   66: invokevirtual 614	android/database/sqlite/SQLiteDatabase:setTransactionSuccessful	()V
    //   69: aload_2
    //   70: ifnull -64 -> 6
    //   73: aload_2
    //   74: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   77: aload_2
    //   78: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   81: goto -75 -> 6
    //   84: aload_2
    //   85: ldc_w 600
    //   88: aconst_null
    //   89: aload_0
    //   90: aload_1
    //   91: iload 6
    //   93: invokeinterface 495 2 0
    //   98: checkcast 402	com/iknow/data/Word
    //   101: invokespecial 602	com/iknow/db/IKnowDataBase:getWordContentValues	(Lcom/iknow/data/Word;)Landroid/content/ContentValues;
    //   104: invokevirtual 503	android/database/sqlite/SQLiteDatabase:insert	(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J
    //   107: pop2
    //   108: iinc 6 1
    //   111: goto -57 -> 54
    //   114: astore 4
    //   116: ldc_w 604
    //   119: ldc_w 512
    //   122: invokestatic 515	com/iknow/util/Loger:d	(Ljava/lang/String;Ljava/lang/String;)V
    //   125: aload_2
    //   126: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   129: aload_2
    //   130: ifnull -124 -> 6
    //   133: aload_2
    //   134: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   137: aload_2
    //   138: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   141: goto -135 -> 6
    //   144: astore_3
    //   145: aload_2
    //   146: ifnull +11 -> 157
    //   149: aload_2
    //   150: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   153: aload_2
    //   154: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   157: aload_3
    //   158: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   16	25	114	java/lang/Exception
    //   47	69	114	java/lang/Exception
    //   84	108	114	java/lang/Exception
    //   16	25	144	finally
    //   47	69	144	finally
    //   84	108	144	finally
    //   116	129	144	finally
  }

  public void clearQingbos()
  {
  }

  public void deleteAllFriend()
  {
    Object[] arrayOfObject = new Object[1];
    arrayOfObject[0] = "xmpp_roster";
    String str = String.format("delete  from %s", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void deleteAllMessage()
  {
    Object[] arrayOfObject = new Object[1];
    arrayOfObject[0] = "XmppMessage";
    String str = String.format("delete from %s", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void deleteAllRosterItem()
  {
    Object[] arrayOfObject = new Object[1];
    arrayOfObject[0] = "xmpp_roster";
    String str = String.format("delete from %s", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void deleteAllSession()
  {
    Object[] arrayOfObject = new Object[1];
    arrayOfObject[0] = "session";
    String str = String.format("delete from %s", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void deleteAllSubscribeTag()
  {
    Object[] arrayOfObject = new Object[1];
    arrayOfObject[0] = "subscribe_tag";
    String str = String.format("delete from %s", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void deleteFriend(String paramString)
  {
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = "roster";
    arrayOfObject[1] = "jid";
    arrayOfObject[2] = paramString;
    String str = String.format("delete from %s where %s='%s'", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void deleteFriendMessage(String paramString)
  {
    Object[] arrayOfObject1 = new Object[3];
    arrayOfObject1[0] = "XmppMessage";
    arrayOfObject1[1] = "msgfrom";
    arrayOfObject1[2] = paramString;
    String str1 = String.format("delete from %s where %s='%s'", arrayOfObject1);
    this.mDBHepler.getWritableDatabase().execSQL(str1);
    Object[] arrayOfObject2 = new Object[3];
    arrayOfObject2[0] = "XmppMessage";
    arrayOfObject2[1] = "msgto";
    arrayOfObject2[2] = paramString;
    String str2 = String.format("delete from %s where %s='%s'", arrayOfObject2);
    this.mDBHepler.getWritableDatabase().execSQL(str2);
  }

  public void deleteNearByFriend()
  {
    Object[] arrayOfObject = new Object[1];
    arrayOfObject[0] = "near_by_friends";
    String str = String.format("delete from %s", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void deleteQingBo(String paramString1, int paramInt, String paramString2)
  {
    Object[] arrayOfObject = new Object[5];
    arrayOfObject[0] = "qingbo";
    arrayOfObject[1] = "id";
    arrayOfObject[2] = paramString1;
    arrayOfObject[3] = "page_type";
    arrayOfObject[4] = Integer.valueOf(paramInt);
    String str = String.format("delete from %s where %s='%s' and %s='%d'", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void deleteRosterItem(String paramString)
  {
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = "xmpp_roster";
    arrayOfObject[1] = "jid";
    arrayOfObject[2] = paramString;
    String str = String.format("delete from %s where %s='%s'", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void deleteSession(String paramString)
  {
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = "session";
    arrayOfObject[1] = "roster_id";
    arrayOfObject[2] = paramString;
    String str = String.format("delete from %s where %s='%s'", arrayOfObject);
    try
    {
      this.mDBHepler.getWritableDatabase().execSQL(str);
      deleteFriendMessage(paramString);
      return;
    }
    catch (Exception localException)
    {
      Loger.e("IKnowDataBase", "delete Session Error:" + localException.getMessage());
    }
  }

  public void deleteSubscribeQingbo(String paramString)
  {
    SQLiteDatabase localSQLiteDatabase = this.mDBHepler.getWritableDatabase();
    String[] arrayOfString = new String[1];
    arrayOfString[0] = paramString;
    int i = localSQLiteDatabase.delete("subscribe_qingbo", "tag", arrayOfString);
    Loger.i("SubscribeQingboTable", "delete Subscribe qingbo counts:" + String.valueOf(i));
  }

  public void deleteSubscribeTag(SubscribeTag paramSubscribeTag, String paramString)
  {
    Object[] arrayOfObject = new Object[5];
    arrayOfObject[0] = "subscribe_tag";
    arrayOfObject[1] = "tag_name";
    arrayOfObject[2] = paramSubscribeTag.getTagName();
    arrayOfObject[3] = "user_id";
    arrayOfObject[4] = paramString;
    String str = String.format("delete from %s where %s='%s' and %s='%s'", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
    SubscribeQingbo(paramSubscribeTag.getTagName(), false);
  }

  public void deleteUser()
  {
    Object[] arrayOfObject = new Object[1];
    arrayOfObject[0] = "iKnowUser";
    String str = String.format("delete from %s", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public boolean existSubscribeTag(SubscribeTag paramSubscribeTag)
  {
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = "subscribe_tag";
    arrayOfObject[1] = "tag_name";
    arrayOfObject[2] = paramSubscribeTag.getTagName();
    String str = String.format("select count(*) from %s where %s='%s'", arrayOfObject);
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    int i = 0;
    if (!(localCursor.moveToNext()));
    while (true)
    {
      do
      {
        localCursor.close();
        return i;
      }
      while (localCursor.getInt(0) <= 0);
      i = 1;
    }
  }

  public boolean existSubscribeTag(String paramString)
  {
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = "subscribe_tag";
    arrayOfObject[1] = "user_id";
    arrayOfObject[2] = paramString;
    String str = String.format("select count(*) from %s where %s='%s'", arrayOfObject);
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    int i = 0;
    if (!(localCursor.moveToNext()));
    while (true)
    {
      do
      {
        localCursor.close();
        return i;
      }
      while (localCursor.getInt(0) <= 0);
      i = 1;
    }
  }

  public List<MessageSesstion> getAllSessionMsg()
  {
    ArrayList localArrayList = new ArrayList();
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery("select * from session order by date DESC", null);
    while (true)
    {
      if (!(localCursor.moveToNext()))
      {
        localCursor.close();
        return localArrayList;
      }
      localArrayList.add(SessionTable.parseMessageSesstion(localCursor));
    }
  }

  public List<QingBo> getAllSubscribeQingboList()
  {
    ArrayList localArrayList = new ArrayList();
    Object[] arrayOfObject = new Object[4];
    arrayOfObject[0] = "subscribe_qingbo";
    arrayOfObject[1] = "subscribe_flag";
    arrayOfObject[2] = Integer.valueOf(1);
    arrayOfObject[3] = "date";
    String str = String.format("select * from %s where %s='%d' ORDER BY %s ", arrayOfObject);
    try
    {
      Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
      if (!(localCursor.moveToNext()))
        localCursor.close();
      else
        localArrayList.add(SubscribeQingboTable.parseQingbo(localCursor));
    }
    catch (Exception localException)
    {
      Loger.e("QingboTable", "getQingbo error :" + localException.getMessage());
      return localArrayList;
    }
  }

  public int getAllUnreadCount()
  {
    int i = 0;
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery("select unread_count from session", null);
    while (true)
    {
      if (!(localCursor.moveToNext()))
      {
        localCursor.close();
        return i;
      }
      i += localCursor.getInt(localCursor.getColumnIndex("unread_count"));
    }
  }

  public int getFansCount()
  {
    Object[] arrayOfObject = new Object[4];
    arrayOfObject[0] = "xmpp_roster";
    arrayOfObject[1] = "subscribe_mode";
    arrayOfObject[2] = Integer.valueOf(2);
    arrayOfObject[3] = "subscribe_mode";
    String str = String.format("select count(*) from %s where %s=%d or %s=3", arrayOfObject);
    int i = 0;
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    if (localCursor.getCount() > 0)
    {
      localCursor.moveToNext();
      i = localCursor.getInt(0);
    }
    localCursor.close();
    return i;
  }

  public int getFavoriteQingBoCount()
  {
    int i = 0;
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery("select count(*) from favorite", null);
    if (localCursor != null);
    while (true)
    {
      if (!(localCursor.moveToNext()))
      {
        localCursor.close();
        return i;
      }
      i = localCursor.getInt(0);
    }
  }

  public List<QingBo> getFavoriteQingbo(int paramInt1, int paramInt2)
  {
    ArrayList localArrayList = new ArrayList();
    Object[] arrayOfObject = new Object[4];
    arrayOfObject[0] = "favorite";
    arrayOfObject[1] = "date";
    arrayOfObject[2] = Integer.valueOf(paramInt1);
    arrayOfObject[3] = Integer.valueOf(paramInt2);
    String str = String.format("select * from %s ORDER BY %s desc Limit %d, %d  ", arrayOfObject);
    try
    {
      Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
      if (!(localCursor.moveToNext()))
        localCursor.close();
      else
        localArrayList.add(QingboTable.parseQingbo(localCursor));
    }
    catch (Exception localException)
    {
      Loger.e("QingboTable", "getQingbo error :" + localException.getMessage());
      return localArrayList;
    }
  }

  public int getFollowCount()
  {
    Object[] arrayOfObject = new Object[4];
    arrayOfObject[0] = "xmpp_roster";
    arrayOfObject[1] = "subscribe_mode";
    arrayOfObject[2] = Integer.valueOf(1);
    arrayOfObject[3] = "subscribe_mode";
    String str = String.format("select count(*) from %s where %s=%d or %s=3", arrayOfObject);
    int i = 0;
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    if (localCursor.getCount() > 0)
    {
      localCursor.moveToNext();
      i = localCursor.getInt(0);
    }
    localCursor.close();
    return i;
  }

  public String getFriendAvatarUrl(String paramString)
  {
    String str1 = null;
    Object[] arrayOfObject = new Object[4];
    arrayOfObject[0] = "avatar";
    arrayOfObject[1] = "roster";
    arrayOfObject[2] = "jid";
    arrayOfObject[3] = paramString;
    String str2 = String.format("select %s from %s where %s='%s'", arrayOfObject);
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str2, null);
    if (localCursor.getCount() > 0)
    {
      localCursor.moveToNext();
      str1 = localCursor.getString(localCursor.getColumnIndex("avatar"));
    }
    localCursor.close();
    return str1;
  }

  public Friend getFriendInfo(String paramString)
  {
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = "roster";
    arrayOfObject[1] = "jid";
    arrayOfObject[2] = paramString;
    String str = String.format("select * from %s where %s='%s'", arrayOfObject);
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    Friend localFriend = null;
    while (true)
    {
      if (!(localCursor.moveToNext()))
      {
        localCursor.close();
        return localFriend;
      }
      localFriend = FriendTable.parseCursor(localCursor);
    }
  }

  public List<QingBo> getFriendQingbo(int paramInt1, int paramInt2, String paramString)
  {
    ArrayList localArrayList = new ArrayList();
    Object[] arrayOfObject = new Object[8];
    arrayOfObject[0] = "qingbo";
    arrayOfObject[1] = "jid";
    arrayOfObject[2] = paramString;
    arrayOfObject[3] = "page_type";
    arrayOfObject[4] = Integer.valueOf(5);
    arrayOfObject[5] = "date";
    arrayOfObject[6] = Integer.valueOf(paramInt2);
    arrayOfObject[7] = Integer.valueOf(paramInt1);
    String str = String.format("select * from %s where %s='%s' and %s = %d order by %s DESC limit %d offset %d", arrayOfObject);
    try
    {
      Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
      if ((localCursor == null) || (localCursor.getCount() == 0) || (!(localCursor.moveToNext())))
        localCursor.close();
      else
        localArrayList.add(QingboTable.parseQingbo(localCursor));
    }
    catch (Exception localException)
    {
      Loger.e("QingboTable", "getQingbo error :" + localException.getMessage());
      return localArrayList;
    }
  }

  public long getFriendQingboMaxTime(String paramString1, String paramString2)
  {
    Object[] arrayOfObject = new Object[7];
    arrayOfObject[0] = "date";
    arrayOfObject[1] = "qingbo";
    arrayOfObject[2] = "jid";
    arrayOfObject[3] = paramString1;
    arrayOfObject[4] = "page_type";
    arrayOfObject[5] = Integer.valueOf(5);
    arrayOfObject[6] = "date";
    return getQingboDate(String.format("select %s from %s where %s='%s' and %s = %d ORDER BY %s DESC limit 1", arrayOfObject));
  }

  public long getFriendQingboMinTime(String paramString1, String paramString2)
  {
    Object[] arrayOfObject = new Object[7];
    arrayOfObject[0] = "date";
    arrayOfObject[1] = "qingbo";
    arrayOfObject[2] = "jid";
    arrayOfObject[3] = paramString1;
    arrayOfObject[4] = "page_type";
    arrayOfObject[5] = Integer.valueOf(5);
    arrayOfObject[6] = "date";
    return getQingboDate(String.format("select %s from %s where %s='%s' and %s = %d ORDER BY %s  limit 1", arrayOfObject));
  }

  public List<Friend> getFriends()
  {
    ArrayList localArrayList = new ArrayList();
    Object[] arrayOfObject = new Object[4];
    arrayOfObject[0] = "jid";
    arrayOfObject[1] = "xmpp_roster";
    arrayOfObject[2] = "subscribe_mode";
    arrayOfObject[3] = Integer.valueOf(3);
    String str = String.format("select %s from %s where %s=%d", arrayOfObject);
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    while (true)
    {
      if (!(localCursor.moveToNext()))
      {
        localCursor.close();
        return localArrayList;
      }
      localArrayList.add(getFriendInfo(localCursor.getString(0)));
    }
  }

  public long getMaxQingboTime(int paramInt, String paramString)
  {
    String str;
    if (-1 == paramInt)
    {
      Object[] arrayOfObject2 = new Object[3];
      arrayOfObject2[0] = "date";
      arrayOfObject2[1] = "qingbo";
      arrayOfObject2[2] = "date";
      str = String.format("select %s from %s ORDER BY %s DESC limit 1", arrayOfObject2);
    }
    while (true)
    {
      return getQingboDate(str);
      Object[] arrayOfObject1 = new Object[5];
      arrayOfObject1[0] = "date";
      arrayOfObject1[1] = "qingbo";
      arrayOfObject1[2] = "page_type";
      arrayOfObject1[3] = Integer.valueOf(paramInt);
      arrayOfObject1[4] = "date";
      str = String.format("select %s from %s where %s=%d ORDER BY %s DESC limit 1", arrayOfObject1);
    }
  }

  public long getMaxTagQingboTime(String paramString1, String paramString2)
  {
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = "date";
    arrayOfObject[1] = "subscribe_qingbo";
    arrayOfObject[2] = "date";
    return getQingboDate(String.format("select %s from %s  ORDER BY %s DESC limit 1", arrayOfObject));
  }

  public long getMinQingboTime(int paramInt, String paramString)
  {
    String str;
    if (-1 == paramInt)
    {
      Object[] arrayOfObject2 = new Object[3];
      arrayOfObject2[0] = "date";
      arrayOfObject2[1] = "qingbo";
      arrayOfObject2[2] = "date";
      str = String.format("select %s from %s ORDER BY %s limit 1", arrayOfObject2);
    }
    while (true)
    {
      return getQingboDate(str);
      Object[] arrayOfObject1 = new Object[5];
      arrayOfObject1[0] = "date";
      arrayOfObject1[1] = "qingbo";
      arrayOfObject1[2] = "page_type";
      arrayOfObject1[3] = Integer.valueOf(paramInt);
      arrayOfObject1[4] = "date";
      str = String.format("select %s from %s where %s=%d ORDER BY %s limit 1", arrayOfObject1);
    }
  }

  public long getMinTagQingboTime(String paramString1, String paramString2)
  {
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = "date";
    arrayOfObject[1] = "subscribe_qingbo";
    arrayOfObject[2] = "date";
    return getQingboDate(String.format("select %s from %s  ORDER BY %s  limit 1", arrayOfObject));
  }

  public int getMyFriendCount()
  {
    Object[] arrayOfObject = new Object[4];
    arrayOfObject[0] = "xmpp_roster";
    arrayOfObject[1] = "subscribe_mode";
    arrayOfObject[2] = Integer.valueOf(3);
    arrayOfObject[3] = "subscribe_mode";
    String str = String.format("select count(*) from %s where %s=%d or %s=3", arrayOfObject);
    int i = 0;
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    if (localCursor.getCount() > 0)
    {
      localCursor.moveToNext();
      i = localCursor.getInt(0);
    }
    localCursor.close();
    return i;
  }

  public List<Friend> getMyRoster(int paramInt)
  {
    ArrayList localArrayList = new ArrayList();
    Object[] arrayOfObject = new Object[5];
    arrayOfObject[0] = "jid";
    arrayOfObject[1] = "xmpp_roster";
    arrayOfObject[2] = "subscribe_mode";
    arrayOfObject[3] = Integer.valueOf(paramInt);
    arrayOfObject[4] = "subscribe_mode";
    String str = String.format("select %s from %s where %s=%d or %s=3", arrayOfObject);
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    while (true)
    {
      if (!(localCursor.moveToNext()))
      {
        localCursor.close();
        return localArrayList;
      }
      localArrayList.add(getFriendInfo(localCursor.getString(0)));
    }
  }

  public List<String> getMyRosterID(int paramInt1, int paramInt2, int paramInt3)
  {
    String str;
    Cursor localCursor;
    ArrayList localArrayList = new ArrayList();
    if (paramInt1 == 3)
    {
      Object[] arrayOfObject2 = new Object[7];
      arrayOfObject2[0] = "jid";
      arrayOfObject2[1] = "xmpp_roster";
      arrayOfObject2[2] = "subscribe_mode";
      arrayOfObject2[3] = Integer.valueOf(paramInt1);
      arrayOfObject2[4] = "presence";
      arrayOfObject2[5] = Integer.valueOf(paramInt3);
      arrayOfObject2[6] = Integer.valueOf(paramInt2);
      str = String.format("select %s from %s where %s=%d order by %s desc  limit %d offset %d", arrayOfObject2);
      localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    }
    while (true)
    {
      while (!(localCursor.moveToNext()))
      {
        localCursor.close();
        return localArrayList;
        Object[] arrayOfObject1 = new Object[7];
        arrayOfObject1[0] = "jid";
        arrayOfObject1[1] = "xmpp_roster";
        arrayOfObject1[2] = "subscribe_mode";
        arrayOfObject1[3] = Integer.valueOf(paramInt1);
        arrayOfObject1[4] = "subscribe_mode";
        arrayOfObject1[5] = Integer.valueOf(paramInt3);
        arrayOfObject1[6] = Integer.valueOf(paramInt2);
        str = String.format("select %s from %s where %s=%d or %s=3 limit %d offset %d", arrayOfObject1);
      }
      localArrayList.add(localCursor.getString(0));
    }
  }

  public List<Friend> getNearByFriend()
  {
    ArrayList localArrayList = new ArrayList();
    Object[] arrayOfObject = new Object[1];
    arrayOfObject[0] = "near_by_friends";
    String str = String.format("select * from %s", arrayOfObject);
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    while (true)
    {
      if (!(localCursor.moveToNext()))
      {
        localCursor.close();
        return localArrayList;
      }
      localArrayList.add(NearByFriendTable.parseCursor(localCursor));
    }
  }

  public List<IKProductListDataInfo> getProduct()
  {
    ArrayList localArrayList = new ArrayList();
    Cursor localCursor = this.mDBHepler.getReadableDatabase().query("T_BD_PRODUCTFAVORITES", IKProductFavoriteTable.TABLE_COLUMNS, null, null, null, null, null);
    localCursor.moveToFirst();
    while (true)
    {
      if (localCursor.isAfterLast())
      {
        localCursor.close();
        return localArrayList;
      }
      IKProductListDataInfo localIKProductListDataInfo = new IKProductListDataInfo();
      localIKProductListDataInfo.setUserId(localCursor.getString(localCursor.getColumnIndex("user_id")));
      localIKProductListDataInfo.setId(localCursor.getString(localCursor.getColumnIndex("id")));
      localIKProductListDataInfo.setUrl(localCursor.getString(localCursor.getColumnIndex("url")));
      localIKProductListDataInfo.setBookName(localCursor.getString(localCursor.getColumnIndex("name")));
      localIKProductListDataInfo.setBook_Provider(localCursor.getString(localCursor.getColumnIndex("provider")));
      localIKProductListDataInfo.setRank(localCursor.getFloat(localCursor.getColumnIndex("rank")));
      localIKProductListDataInfo.setIsFree(localCursor.getString(localCursor.getColumnIndex("isFree")));
      localIKProductListDataInfo.setOpenType(localCursor.getString(localCursor.getColumnIndex("openType")));
      localIKProductListDataInfo.setProductFavoriteTime(localCursor.getLong(localCursor.getColumnIndex("favorite_time")));
      localIKProductListDataInfo.setProductFavoriteDeleteTime(localCursor.getLong(localCursor.getColumnIndex("favorite_delete_time")));
      localArrayList.add(localIKProductListDataInfo);
      localCursor.moveToNext();
    }
  }

  // ERROR //
  public List<QingBo> getQingbo(int paramInt1, int paramInt2, int paramInt3, String paramString)
  {
    // Byte code:
    //   0: new 667	java/util/ArrayList
    //   3: dup
    //   4: invokespecial 668	java/util/ArrayList:<init>	()V
    //   7: astore 5
    //   9: aload 4
    //   11: ifnonnull +168 -> 179
    //   14: bipush 255
    //   16: iload_3
    //   17: if_icmpne +98 -> 115
    //   20: iconst_4
    //   21: anewarray 4	java/lang/Object
    //   24: astore 12
    //   26: aload 12
    //   28: iconst_0
    //   29: ldc_w 631
    //   32: aastore
    //   33: aload 12
    //   35: iconst_1
    //   36: ldc 58
    //   38: aastore
    //   39: aload 12
    //   41: iconst_2
    //   42: iload_2
    //   43: invokestatic 226	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   46: aastore
    //   47: aload 12
    //   49: iconst_3
    //   50: iload_1
    //   51: invokestatic 226	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   54: aastore
    //   55: ldc_w 853
    //   58: aload 12
    //   60: invokestatic 459	java/lang/String:format	(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
    //   63: astore 7
    //   65: aload_0
    //   66: getfield 34	com/iknow/db/IKnowDataBase:mDBHepler	Lcom/iknow/db/IKnowDatabaseHelper;
    //   69: invokevirtual 320	com/iknow/db/IKnowDatabaseHelper:getReadableDatabase	()Landroid/database/sqlite/SQLiteDatabase;
    //   72: aload 7
    //   74: aconst_null
    //   75: invokevirtual 326	android/database/sqlite/SQLiteDatabase:rawQuery	(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;
    //   78: astore 9
    //   80: aload 9
    //   82: ifnull +23 -> 105
    //   85: aload 9
    //   87: invokeinterface 331 1 0
    //   92: ifeq +13 -> 105
    //   95: aload 9
    //   97: invokeinterface 335 1 0
    //   102: ifne +155 -> 257
    //   105: aload 9
    //   107: invokeinterface 342 1 0
    //   112: aload 5
    //   114: areturn
    //   115: bipush 6
    //   117: anewarray 4	java/lang/Object
    //   120: astore 11
    //   122: aload 11
    //   124: iconst_0
    //   125: ldc_w 631
    //   128: aastore
    //   129: aload 11
    //   131: iconst_1
    //   132: ldc_w 299
    //   135: aastore
    //   136: aload 11
    //   138: iconst_2
    //   139: iload_3
    //   140: invokestatic 226	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   143: aastore
    //   144: aload 11
    //   146: iconst_3
    //   147: ldc 58
    //   149: aastore
    //   150: aload 11
    //   152: iconst_4
    //   153: iload_2
    //   154: invokestatic 226	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   157: aastore
    //   158: aload 11
    //   160: iconst_5
    //   161: iload_1
    //   162: invokestatic 226	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   165: aastore
    //   166: ldc_w 855
    //   169: aload 11
    //   171: invokestatic 459	java/lang/String:format	(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
    //   174: astore 7
    //   176: goto -111 -> 65
    //   179: bipush 8
    //   181: anewarray 4	java/lang/Object
    //   184: astore 6
    //   186: aload 6
    //   188: iconst_0
    //   189: ldc_w 631
    //   192: aastore
    //   193: aload 6
    //   195: iconst_1
    //   196: ldc_w 299
    //   199: aastore
    //   200: aload 6
    //   202: iconst_2
    //   203: iload_3
    //   204: invokestatic 226	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   207: aastore
    //   208: aload 6
    //   210: iconst_3
    //   211: ldc 88
    //   213: aastore
    //   214: aload 6
    //   216: iconst_4
    //   217: aload 4
    //   219: aastore
    //   220: aload 6
    //   222: iconst_5
    //   223: ldc 58
    //   225: aastore
    //   226: aload 6
    //   228: bipush 6
    //   230: iload_2
    //   231: invokestatic 226	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   234: aastore
    //   235: aload 6
    //   237: bipush 7
    //   239: iload_1
    //   240: invokestatic 226	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   243: aastore
    //   244: ldc_w 857
    //   247: aload 6
    //   249: invokestatic 459	java/lang/String:format	(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
    //   252: astore 7
    //   254: goto -189 -> 65
    //   257: aload 5
    //   259: aload 9
    //   261: invokestatic 710	com/iknow/db/QingboTable:parseQingbo	(Landroid/database/Cursor;)Lcom/iknow/data/QingBo;
    //   264: invokeinterface 680 2 0
    //   269: pop
    //   270: goto -175 -> 95
    //   273: astore 8
    //   275: ldc_w 510
    //   278: new 569	java/lang/StringBuilder
    //   281: dup
    //   282: ldc_w 691
    //   285: invokespecial 573	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   288: aload 8
    //   290: invokevirtual 464	java/lang/Exception:getMessage	()Ljava/lang/String;
    //   293: invokevirtual 578	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   296: invokevirtual 579	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   299: invokestatic 469	com/iknow/util/Loger:e	(Ljava/lang/String;Ljava/lang/String;)V
    //   302: goto -190 -> 112
    //
    // Exception table:
    //   from	to	target	type
    //   65	112	273	java/lang/Exception
    //   257	270	273	java/lang/Exception
  }

  public List<QingBo> getSubscribeQingboList(String paramString)
  {
    ArrayList localArrayList = new ArrayList();
    Object[] arrayOfObject = new Object[4];
    arrayOfObject[0] = "subscribe_qingbo";
    arrayOfObject[1] = "tag";
    arrayOfObject[2] = paramString;
    arrayOfObject[3] = "date";
    String str = String.format("select * from %s where %s='%s' ORDER BY %s ", arrayOfObject);
    try
    {
      Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
      if (!(localCursor.moveToNext()))
        localCursor.close();
      else
        localArrayList.add(SubscribeQingboTable.parseQingbo(localCursor));
    }
    catch (Exception localException)
    {
      Loger.e("QingboTable", "getQingbo error :" + localException.getMessage());
      return localArrayList;
    }
  }

  public List<SubscribeTag> getSubscribeTags(String paramString)
  {
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = "subscribe_tag";
    arrayOfObject[1] = "user_id";
    arrayOfObject[2] = paramString;
    String str = String.format("select * from %s where %s='%s'", arrayOfObject);
    ArrayList localArrayList = null;
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    if ((localCursor != null) && (localCursor.getCount() > 0))
      localArrayList = new ArrayList(localCursor.getCount());
    while (true)
    {
      if (!(localCursor.moveToNext()))
      {
        localCursor.close();
        return localArrayList;
      }
      localArrayList.add(SubscribeTagTable.parserCursor(localCursor));
    }
  }

  public List<QingBo> getTagQingbo(int paramInt1, int paramInt2, String paramString)
  {
    ArrayList localArrayList = new ArrayList();
    String str1 = '%' + paramString + '%';
    Object[] arrayOfObject = new Object[5];
    arrayOfObject[0] = "subscribe_qingbo";
    arrayOfObject[1] = "tag";
    arrayOfObject[2] = "date";
    arrayOfObject[3] = Integer.valueOf(paramInt2);
    arrayOfObject[4] = Integer.valueOf(paramInt1);
    String str2 = String.format("select * from %s where %s like ? order by %s DESC limit %d offset %d", arrayOfObject);
    try
    {
      SQLiteDatabase localSQLiteDatabase = this.mDBHepler.getReadableDatabase();
      String[] arrayOfString = new String[1];
      arrayOfString[0] = str1;
      Cursor localCursor = localSQLiteDatabase.rawQuery(str2, arrayOfString);
      if ((localCursor == null) || (localCursor.getCount() == 0) || (!(localCursor.moveToNext())))
        localCursor.close();
      else
        localArrayList.add(SubscribeQingboTable.parseQingbo(localCursor));
    }
    catch (Exception localException)
    {
      Loger.e("SubscribeQingboTable", "getQingbo error :" + localException.getMessage());
      return localArrayList;
    }
  }

  public int getTotalCount(String paramString)
  {
    Object[] arrayOfObject = new Object[2];
    arrayOfObject[0] = "session";
    arrayOfObject[1] = paramString;
    String str = String.format("select total from %s where roster_id='%s'", arrayOfObject);
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    int i = 0;
    if (localCursor.moveToNext())
      i = Integer.parseInt(localCursor.getString(localCursor.getColumnIndex("total")));
    localCursor.close();
    return i;
  }

  public int getUnreadCount(String paramString)
  {
    Object[] arrayOfObject = new Object[4];
    arrayOfObject[0] = "unread_count";
    arrayOfObject[1] = "session";
    arrayOfObject[2] = "roster_id";
    arrayOfObject[3] = paramString;
    String str = String.format("select %s from %s where %s='%s'", arrayOfObject);
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    int i = 0;
    if (localCursor.moveToNext())
      i = Integer.parseInt(localCursor.getString(localCursor.getColumnIndex("unread_count")));
    localCursor.close();
    return i;
  }

  public User getUser()
  {
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery("select * from iKnowUser", null);
    User localUser = null;
    while (true)
    {
      if ((localCursor == null) || (localCursor.getCount() <= 0) || (!(localCursor.moveToNext())))
      {
        localCursor.close();
        return localUser;
      }
      localUser = UserTable.parseUser(localCursor);
    }
  }

  // ERROR //
  public Word getWord(String paramString, int paramInt)
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_3
    //   2: aconst_null
    //   3: astore 4
    //   5: aconst_null
    //   6: astore 5
    //   8: aload_0
    //   9: getfield 34	com/iknow/db/IKnowDataBase:mDBHepler	Lcom/iknow/db/IKnowDatabaseHelper;
    //   12: invokevirtual 320	com/iknow/db/IKnowDatabaseHelper:getReadableDatabase	()Landroid/database/sqlite/SQLiteDatabase;
    //   15: astore_3
    //   16: aload_3
    //   17: invokevirtual 611	android/database/sqlite/SQLiteDatabase:beginTransaction	()V
    //   20: aload_3
    //   21: new 569	java/lang/StringBuilder
    //   24: dup
    //   25: ldc_w 899
    //   28: invokespecial 573	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   31: aload_1
    //   32: invokevirtual 578	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   35: ldc_w 901
    //   38: invokevirtual 578	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   41: invokevirtual 579	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   44: aconst_null
    //   45: invokevirtual 326	android/database/sqlite/SQLiteDatabase:rawQuery	(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;
    //   48: astore 4
    //   50: aload 4
    //   52: ifnull +217 -> 269
    //   55: aload 4
    //   57: invokeinterface 331 1 0
    //   62: ifeq +207 -> 269
    //   65: aload 4
    //   67: iload_2
    //   68: invokeinterface 905 2 0
    //   73: ifeq +192 -> 265
    //   76: new 402	com/iknow/data/Word
    //   79: dup
    //   80: invokespecial 906	com/iknow/data/Word:<init>	()V
    //   83: astore 8
    //   85: aload 8
    //   87: aload 4
    //   89: aload 4
    //   91: ldc_w 407
    //   94: invokeinterface 697 2 0
    //   99: invokeinterface 715 2 0
    //   104: invokevirtual 909	com/iknow/data/Word:setKey	(Ljava/lang/String;)V
    //   107: aload 8
    //   109: aload 4
    //   111: aload 4
    //   113: ldc 48
    //   115: invokeinterface 697 2 0
    //   120: invokeinterface 715 2 0
    //   125: invokevirtual 910	com/iknow/data/Word:setUserId	(Ljava/lang/String;)V
    //   128: aload 8
    //   130: aload 4
    //   132: aload 4
    //   134: ldc_w 425
    //   137: invokeinterface 697 2 0
    //   142: invokeinterface 715 2 0
    //   147: invokevirtual 913	com/iknow/data/Word:setPron	(Ljava/lang/String;)V
    //   150: aload 8
    //   152: aload 4
    //   154: aload 4
    //   156: ldc 173
    //   158: invokeinterface 697 2 0
    //   163: invokeinterface 715 2 0
    //   168: invokevirtual 916	com/iknow/data/Word:setLang	(Ljava/lang/String;)V
    //   171: aload 8
    //   173: aload 4
    //   175: aload 4
    //   177: ldc_w 415
    //   180: invokeinterface 697 2 0
    //   185: invokeinterface 715 2 0
    //   190: invokevirtual 598	com/iknow/data/Word:setWordMemo	(Ljava/lang/String;)V
    //   193: aload 8
    //   195: aload 4
    //   197: aload 4
    //   199: ldc_w 430
    //   202: invokeinterface 697 2 0
    //   207: invokeinterface 715 2 0
    //   212: invokevirtual 919	com/iknow/data/Word:setDef	(Ljava/lang/String;)V
    //   215: aload 8
    //   217: aload 4
    //   219: aload 4
    //   221: ldc_w 420
    //   224: invokeinterface 697 2 0
    //   229: invokeinterface 715 2 0
    //   234: invokevirtual 922	com/iknow/data/Word:setAudioUrl	(Ljava/lang/String;)V
    //   237: aload 8
    //   239: aload 4
    //   241: aload 4
    //   243: ldc 58
    //   245: invokeinterface 697 2 0
    //   250: invokeinterface 715 2 0
    //   255: invokestatic 926	com/iknow/util/StringUtil:StrToDate	(Ljava/lang/String;)Ljava/util/Date;
    //   258: invokevirtual 930	com/iknow/data/Word:setCreateDate	(Ljava/util/Date;)V
    //   261: aload 8
    //   263: astore 5
    //   265: aload_3
    //   266: invokevirtual 614	android/database/sqlite/SQLiteDatabase:setTransactionSuccessful	()V
    //   269: aload 4
    //   271: ifnull +10 -> 281
    //   274: aload 4
    //   276: invokeinterface 342 1 0
    //   281: aload_3
    //   282: ifnull +11 -> 293
    //   285: aload_3
    //   286: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   289: aload_3
    //   290: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   293: aload 5
    //   295: areturn
    //   296: astore 7
    //   298: ldc_w 604
    //   301: ldc_w 932
    //   304: invokestatic 515	com/iknow/util/Loger:d	(Ljava/lang/String;Ljava/lang/String;)V
    //   307: aload_3
    //   308: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   311: aload 4
    //   313: ifnull +10 -> 323
    //   316: aload 4
    //   318: invokeinterface 342 1 0
    //   323: aload_3
    //   324: ifnull -31 -> 293
    //   327: aload_3
    //   328: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   331: aload_3
    //   332: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   335: goto -42 -> 293
    //   338: astore 6
    //   340: aload 4
    //   342: ifnull +10 -> 352
    //   345: aload 4
    //   347: invokeinterface 342 1 0
    //   352: aload_3
    //   353: ifnull +11 -> 364
    //   356: aload_3
    //   357: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   360: aload_3
    //   361: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   364: aload 6
    //   366: athrow
    //   367: astore 6
    //   369: goto -29 -> 340
    //   372: astore 9
    //   374: aload 8
    //   376: astore 5
    //   378: goto -80 -> 298
    //
    // Exception table:
    //   from	to	target	type
    //   8	85	296	java/lang/Exception
    //   265	269	296	java/lang/Exception
    //   8	85	338	finally
    //   265	269	338	finally
    //   298	311	338	finally
    //   85	261	367	finally
    //   85	261	372	java/lang/Exception
  }

  // ERROR //
  public List<Word> getWord(int paramInt1, int paramInt2)
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_3
    //   2: aconst_null
    //   3: astore 4
    //   5: aconst_null
    //   6: astore 5
    //   8: aload_0
    //   9: getfield 34	com/iknow/db/IKnowDataBase:mDBHepler	Lcom/iknow/db/IKnowDatabaseHelper;
    //   12: invokevirtual 320	com/iknow/db/IKnowDatabaseHelper:getReadableDatabase	()Landroid/database/sqlite/SQLiteDatabase;
    //   15: astore 5
    //   17: new 667	java/util/ArrayList
    //   20: dup
    //   21: invokespecial 668	java/util/ArrayList:<init>	()V
    //   24: astore 8
    //   26: aload 5
    //   28: ifnonnull +34 -> 62
    //   31: iconst_0
    //   32: ifeq +9 -> 41
    //   35: aconst_null
    //   36: invokeinterface 342 1 0
    //   41: aload 5
    //   43: ifnull +13 -> 56
    //   46: aload 5
    //   48: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   51: aload 5
    //   53: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   56: aload 8
    //   58: pop
    //   59: aload 8
    //   61: areturn
    //   62: aload 5
    //   64: invokevirtual 611	android/database/sqlite/SQLiteDatabase:beginTransaction	()V
    //   67: iconst_4
    //   68: anewarray 4	java/lang/Object
    //   71: astore 11
    //   73: aload 11
    //   75: iconst_0
    //   76: ldc_w 600
    //   79: aastore
    //   80: aload 11
    //   82: iconst_1
    //   83: ldc 58
    //   85: aastore
    //   86: aload 11
    //   88: iconst_2
    //   89: iload_2
    //   90: invokestatic 226	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   93: aastore
    //   94: aload 11
    //   96: iconst_3
    //   97: iload_1
    //   98: invokestatic 226	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   101: aastore
    //   102: aload 5
    //   104: ldc_w 934
    //   107: aload 11
    //   109: invokestatic 459	java/lang/String:format	(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
    //   112: aconst_null
    //   113: invokevirtual 326	android/database/sqlite/SQLiteDatabase:rawQuery	(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;
    //   116: astore 4
    //   118: aload 4
    //   120: ifnull +23 -> 143
    //   123: aload 4
    //   125: invokeinterface 331 1 0
    //   130: ifle +13 -> 143
    //   133: aload 4
    //   135: invokeinterface 335 1 0
    //   140: ifne +44 -> 184
    //   143: aload 5
    //   145: invokevirtual 614	android/database/sqlite/SQLiteDatabase:setTransactionSuccessful	()V
    //   148: aload 4
    //   150: ifnull +10 -> 160
    //   153: aload 4
    //   155: invokeinterface 342 1 0
    //   160: aload 5
    //   162: ifnull +13 -> 175
    //   165: aload 5
    //   167: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   170: aload 5
    //   172: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   175: aload 8
    //   177: astore_3
    //   178: aload_3
    //   179: astore 8
    //   181: goto -122 -> 59
    //   184: aload 8
    //   186: aload 4
    //   188: invokestatic 940	com/iknow/db/IKStrangeWordTable:paseWordInfo	(Landroid/database/Cursor;)Lcom/iknow/data/Word;
    //   191: invokeinterface 680 2 0
    //   196: pop
    //   197: goto -64 -> 133
    //   200: astore 10
    //   202: aload 8
    //   204: astore_3
    //   205: aload 5
    //   207: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   210: aload 4
    //   212: ifnull +10 -> 222
    //   215: aload 4
    //   217: invokeinterface 342 1 0
    //   222: aload 5
    //   224: ifnull -46 -> 178
    //   227: aload 5
    //   229: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   232: aload 5
    //   234: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   237: goto -59 -> 178
    //   240: astore 7
    //   242: aload 4
    //   244: ifnull +10 -> 254
    //   247: aload 4
    //   249: invokeinterface 342 1 0
    //   254: aload 5
    //   256: ifnull +13 -> 269
    //   259: aload 5
    //   261: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   264: aload 5
    //   266: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   269: aload 7
    //   271: athrow
    //   272: astore 7
    //   274: aload 8
    //   276: pop
    //   277: goto -35 -> 242
    //   280: astore 6
    //   282: goto -77 -> 205
    //
    // Exception table:
    //   from	to	target	type
    //   62	148	200	java/lang/Exception
    //   184	197	200	java/lang/Exception
    //   8	26	240	finally
    //   205	210	240	finally
    //   62	148	272	finally
    //   184	197	272	finally
    //   8	26	280	java/lang/Exception
  }

  public int getWordCount()
  {
    int i = 0;
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery("select count(1) from T_BD_STRANGEWORD", null);
    while (true)
    {
      if ((localCursor == null) || (!(localCursor.moveToNext())))
        return i;
      i = localCursor.getInt(0);
      localCursor.close();
    }
  }

  public int getWordCountByDate(String paramString)
  {
    int i = 0;
    String str = "select count(1) from t_bd_strangeword where date like '" + paramString + "%'";
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    if ((localCursor.getCount() != 0) && (localCursor.moveToNext()))
      i = localCursor.getInt(0);
    localCursor.close();
    return i;
  }

  // ERROR //
  public String getWordDate(int paramInt)
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_2
    //   2: aconst_null
    //   3: astore_3
    //   4: aconst_null
    //   5: astore 4
    //   7: aload_0
    //   8: getfield 34	com/iknow/db/IKnowDataBase:mDBHepler	Lcom/iknow/db/IKnowDatabaseHelper;
    //   11: invokevirtual 320	com/iknow/db/IKnowDatabaseHelper:getReadableDatabase	()Landroid/database/sqlite/SQLiteDatabase;
    //   14: astore 4
    //   16: aload 4
    //   18: invokevirtual 611	android/database/sqlite/SQLiteDatabase:beginTransaction	()V
    //   21: aload 4
    //   23: ldc_w 948
    //   26: aconst_null
    //   27: invokevirtual 326	android/database/sqlite/SQLiteDatabase:rawQuery	(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;
    //   30: astore_3
    //   31: aload_3
    //   32: ifnull +43 -> 75
    //   35: aload_3
    //   36: invokeinterface 331 1 0
    //   41: ifeq +34 -> 75
    //   44: aload_3
    //   45: iload_1
    //   46: invokeinterface 905 2 0
    //   51: ifeq +19 -> 70
    //   54: aload_3
    //   55: aload_3
    //   56: ldc_w 950
    //   59: invokeinterface 697 2 0
    //   64: invokeinterface 715 2 0
    //   69: astore_2
    //   70: aload 4
    //   72: invokevirtual 614	android/database/sqlite/SQLiteDatabase:setTransactionSuccessful	()V
    //   75: aload_3
    //   76: ifnull +9 -> 85
    //   79: aload_3
    //   80: invokeinterface 342 1 0
    //   85: aload 4
    //   87: ifnull +13 -> 100
    //   90: aload 4
    //   92: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   95: aload 4
    //   97: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   100: aload_2
    //   101: areturn
    //   102: astore 6
    //   104: ldc_w 604
    //   107: ldc_w 952
    //   110: invokestatic 515	com/iknow/util/Loger:d	(Ljava/lang/String;Ljava/lang/String;)V
    //   113: aload 4
    //   115: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   118: aload_3
    //   119: ifnull +9 -> 128
    //   122: aload_3
    //   123: invokeinterface 342 1 0
    //   128: aload 4
    //   130: ifnull -30 -> 100
    //   133: aload 4
    //   135: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   138: aload 4
    //   140: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   143: goto -43 -> 100
    //   146: astore 5
    //   148: aload_3
    //   149: ifnull +9 -> 158
    //   152: aload_3
    //   153: invokeinterface 342 1 0
    //   158: aload 4
    //   160: ifnull +13 -> 173
    //   163: aload 4
    //   165: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   168: aload 4
    //   170: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   173: aload 5
    //   175: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   7	75	102	java/lang/Exception
    //   7	75	146	finally
    //   104	118	146	finally
  }

  public int getWordDateCount()
  {
    int i = 0;
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery("select count(1) as count from (select strftime('%Y-%m-%d',date) as s from t_bd_strangeword group by s )", null);
    if ((localCursor.getCount() != 0) && (localCursor.moveToNext()))
      i = localCursor.getInt(0);
    localCursor.close();
    return i;
  }

  public Word getWordInfo(String paramString)
  {
    Word localWord = new Word();
    SQLiteDatabase localSQLiteDatabase = this.mDBHepler.getReadableDatabase();
    String[] arrayOfString = new String[1];
    arrayOfString[0] = paramString;
    Cursor localCursor = localSQLiteDatabase.rawQuery("select * from T_BD_STRANGEWORD where key = ?", arrayOfString);
    while (true)
    {
      if (!(localCursor.moveToNext()))
      {
        localCursor.close();
        return localWord;
      }
      localWord.setKey(paramString);
      localWord.setUserId(localCursor.getString(localCursor.getColumnIndex("user_id")));
      localWord.setCreateDate(StringUtil.StrToDate(localCursor.getString(localCursor.getColumnIndex("date"))));
      localWord.setAudioUrl(localCursor.getString(localCursor.getColumnIndex("audioUrl")));
      localWord.setDef(localCursor.getString(localCursor.getColumnIndex("def")));
      localWord.setPron(localCursor.getString(localCursor.getColumnIndex("pron")));
      localWord.setWordMemo(localCursor.getString(localCursor.getColumnIndex("memo")));
      localWord.setLang(localCursor.getString(localCursor.getColumnIndex("type")));
    }
  }

  // ERROR //
  public List<Word> getWordList(String paramString)
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_2
    //   2: aconst_null
    //   3: astore_3
    //   4: aconst_null
    //   5: astore 4
    //   7: new 667	java/util/ArrayList
    //   10: dup
    //   11: invokespecial 668	java/util/ArrayList:<init>	()V
    //   14: astore 5
    //   16: aload_0
    //   17: getfield 34	com/iknow/db/IKnowDataBase:mDBHepler	Lcom/iknow/db/IKnowDatabaseHelper;
    //   20: invokevirtual 320	com/iknow/db/IKnowDatabaseHelper:getReadableDatabase	()Landroid/database/sqlite/SQLiteDatabase;
    //   23: astore_2
    //   24: aload_2
    //   25: invokevirtual 611	android/database/sqlite/SQLiteDatabase:beginTransaction	()V
    //   28: aload_2
    //   29: new 569	java/lang/StringBuilder
    //   32: dup
    //   33: ldc_w 899
    //   36: invokespecial 573	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   39: aload_1
    //   40: invokevirtual 578	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   43: ldc_w 901
    //   46: invokevirtual 578	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   49: invokevirtual 579	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   52: aconst_null
    //   53: invokevirtual 326	android/database/sqlite/SQLiteDatabase:rawQuery	(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;
    //   56: astore_3
    //   57: aload_3
    //   58: ifnull +35 -> 93
    //   61: aload_3
    //   62: invokeinterface 331 1 0
    //   67: istore 8
    //   69: iload 8
    //   71: ifeq +22 -> 93
    //   74: aconst_null
    //   75: astore 9
    //   77: aload_3
    //   78: invokeinterface 335 1 0
    //   83: ifne +39 -> 122
    //   86: aload_2
    //   87: invokevirtual 614	android/database/sqlite/SQLiteDatabase:setTransactionSuccessful	()V
    //   90: aload 9
    //   92: pop
    //   93: aload_3
    //   94: ifnull +9 -> 103
    //   97: aload_3
    //   98: invokeinterface 342 1 0
    //   103: aload_2
    //   104: ifnull +11 -> 115
    //   107: aload_2
    //   108: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   111: aload_2
    //   112: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   115: aload 5
    //   117: astore 4
    //   119: aload 4
    //   121: areturn
    //   122: new 402	com/iknow/data/Word
    //   125: dup
    //   126: invokespecial 906	com/iknow/data/Word:<init>	()V
    //   129: astore 13
    //   131: aload 13
    //   133: aload_3
    //   134: aload_3
    //   135: ldc_w 407
    //   138: invokeinterface 697 2 0
    //   143: invokeinterface 715 2 0
    //   148: invokevirtual 909	com/iknow/data/Word:setKey	(Ljava/lang/String;)V
    //   151: aload 13
    //   153: aload_3
    //   154: aload_3
    //   155: ldc 48
    //   157: invokeinterface 697 2 0
    //   162: invokeinterface 715 2 0
    //   167: invokevirtual 910	com/iknow/data/Word:setUserId	(Ljava/lang/String;)V
    //   170: aload 13
    //   172: aload_3
    //   173: aload_3
    //   174: ldc_w 425
    //   177: invokeinterface 697 2 0
    //   182: invokeinterface 715 2 0
    //   187: invokevirtual 913	com/iknow/data/Word:setPron	(Ljava/lang/String;)V
    //   190: aload 13
    //   192: aload_3
    //   193: aload_3
    //   194: ldc 173
    //   196: invokeinterface 697 2 0
    //   201: invokeinterface 715 2 0
    //   206: invokevirtual 916	com/iknow/data/Word:setLang	(Ljava/lang/String;)V
    //   209: aload 13
    //   211: aload_3
    //   212: aload_3
    //   213: ldc_w 415
    //   216: invokeinterface 697 2 0
    //   221: invokeinterface 715 2 0
    //   226: invokevirtual 598	com/iknow/data/Word:setWordMemo	(Ljava/lang/String;)V
    //   229: aload 13
    //   231: aload_3
    //   232: aload_3
    //   233: ldc_w 430
    //   236: invokeinterface 697 2 0
    //   241: invokeinterface 715 2 0
    //   246: invokevirtual 919	com/iknow/data/Word:setDef	(Ljava/lang/String;)V
    //   249: aload 13
    //   251: aload_3
    //   252: aload_3
    //   253: ldc_w 420
    //   256: invokeinterface 697 2 0
    //   261: invokeinterface 715 2 0
    //   266: invokevirtual 922	com/iknow/data/Word:setAudioUrl	(Ljava/lang/String;)V
    //   269: aload 13
    //   271: aload_3
    //   272: aload_3
    //   273: ldc 58
    //   275: invokeinterface 697 2 0
    //   280: invokeinterface 715 2 0
    //   285: invokestatic 926	com/iknow/util/StringUtil:StrToDate	(Ljava/lang/String;)Ljava/util/Date;
    //   288: invokevirtual 930	com/iknow/data/Word:setCreateDate	(Ljava/util/Date;)V
    //   291: aload 5
    //   293: aload 13
    //   295: invokeinterface 680 2 0
    //   300: pop
    //   301: aload 13
    //   303: astore 9
    //   305: goto -228 -> 77
    //   308: astore 16
    //   310: ldc_w 604
    //   313: ldc_w 932
    //   316: invokestatic 515	com/iknow/util/Loger:d	(Ljava/lang/String;Ljava/lang/String;)V
    //   319: aload_2
    //   320: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   323: aload_3
    //   324: ifnull +9 -> 333
    //   327: aload_3
    //   328: invokeinterface 342 1 0
    //   333: aload_2
    //   334: ifnull -215 -> 119
    //   337: aload_2
    //   338: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   341: aload_2
    //   342: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   345: goto -226 -> 119
    //   348: astore 7
    //   350: aload_3
    //   351: ifnull +9 -> 360
    //   354: aload_3
    //   355: invokeinterface 342 1 0
    //   360: aload_2
    //   361: ifnull +11 -> 372
    //   364: aload_2
    //   365: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   368: aload_2
    //   369: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   372: aload 7
    //   374: athrow
    //   375: astore 7
    //   377: goto -27 -> 350
    //   380: astore 7
    //   382: aload 9
    //   384: pop
    //   385: goto -35 -> 350
    //   388: astore 6
    //   390: aload 5
    //   392: astore 4
    //   394: goto -84 -> 310
    //   397: astore 10
    //   399: aload 5
    //   401: astore 4
    //   403: aload 9
    //   405: pop
    //   406: goto -96 -> 310
    //
    // Exception table:
    //   from	to	target	type
    //   7	16	308	java/lang/Exception
    //   7	16	348	finally
    //   310	323	348	finally
    //   16	69	375	finally
    //   131	301	375	finally
    //   77	90	380	finally
    //   122	131	380	finally
    //   16	69	388	java/lang/Exception
    //   131	301	388	java/lang/Exception
    //   77	90	397	java/lang/Exception
    //   122	131	397	java/lang/Exception
  }

  public String getWordMemo(String paramString)
  {
    String str2;
    String str1 = "";
    SQLiteDatabase localSQLiteDatabase = this.mDBHepler.getReadableDatabase();
    String[] arrayOfString = new String[1];
    arrayOfString[0] = paramString;
    Cursor localCursor = localSQLiteDatabase.rawQuery("select * from T_BD_STRANGEWORD where key = ?", arrayOfString);
    if (localCursor == null)
      str2 = str1;
    while (true)
    {
      return str2;
      do
        str1 = localCursor.getString(localCursor.getColumnIndex("memo"));
      while (localCursor.moveToNext());
      localCursor.close();
      str2 = str1;
    }
  }

  // ERROR //
  public List<Message> getXmppMessage(String paramString1, String paramString2)
  {
    // Byte code:
    //   0: new 667	java/util/ArrayList
    //   3: dup
    //   4: invokespecial 668	java/util/ArrayList:<init>	()V
    //   7: astore_3
    //   8: iconst_5
    //   9: anewarray 4	java/lang/Object
    //   12: astore 4
    //   14: aload 4
    //   16: iconst_0
    //   17: ldc_w 531
    //   20: aastore
    //   21: aload 4
    //   23: iconst_1
    //   24: ldc 187
    //   26: aastore
    //   27: aload 4
    //   29: iconst_2
    //   30: aload_2
    //   31: aastore
    //   32: aload 4
    //   34: iconst_3
    //   35: ldc 198
    //   37: aastore
    //   38: aload 4
    //   40: iconst_4
    //   41: aload_1
    //   42: aastore
    //   43: ldc_w 965
    //   46: aload 4
    //   48: invokestatic 459	java/lang/String:format	(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
    //   51: astore 5
    //   53: aload_0
    //   54: getfield 34	com/iknow/db/IKnowDataBase:mDBHepler	Lcom/iknow/db/IKnowDatabaseHelper;
    //   57: invokevirtual 320	com/iknow/db/IKnowDatabaseHelper:getReadableDatabase	()Landroid/database/sqlite/SQLiteDatabase;
    //   60: aload 5
    //   62: aconst_null
    //   63: invokevirtual 326	android/database/sqlite/SQLiteDatabase:rawQuery	(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;
    //   66: astore 12
    //   68: aload 12
    //   70: ifnull +23 -> 93
    //   73: aload 12
    //   75: invokeinterface 331 1 0
    //   80: ifle +13 -> 93
    //   83: aload 12
    //   85: invokeinterface 335 1 0
    //   90: ifne +85 -> 175
    //   93: aload 12
    //   95: invokeinterface 342 1 0
    //   100: iconst_2
    //   101: anewarray 4	java/lang/Object
    //   104: astore 7
    //   106: aload 7
    //   108: iconst_0
    //   109: aload_1
    //   110: aastore
    //   111: aload 7
    //   113: iconst_1
    //   114: aload_2
    //   115: aastore
    //   116: ldc_w 967
    //   119: aload 7
    //   121: invokestatic 459	java/lang/String:format	(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
    //   124: astore 8
    //   126: aload_0
    //   127: getfield 34	com/iknow/db/IKnowDataBase:mDBHepler	Lcom/iknow/db/IKnowDatabaseHelper;
    //   130: invokevirtual 320	com/iknow/db/IKnowDatabaseHelper:getReadableDatabase	()Landroid/database/sqlite/SQLiteDatabase;
    //   133: aload 8
    //   135: aconst_null
    //   136: invokevirtual 326	android/database/sqlite/SQLiteDatabase:rawQuery	(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;
    //   139: astore 10
    //   141: aload 10
    //   143: ifnull +23 -> 166
    //   146: aload 10
    //   148: invokeinterface 331 1 0
    //   153: ifle +13 -> 166
    //   156: aload 10
    //   158: invokeinterface 335 1 0
    //   163: ifne +59 -> 222
    //   166: aload 10
    //   168: invokeinterface 342 1 0
    //   173: aload_3
    //   174: areturn
    //   175: aload_3
    //   176: aload 12
    //   178: invokestatic 973	com/iknow/db/MessageTable:parseMessage	(Landroid/database/Cursor;)Lcom/iknow/xmpp/service/Message;
    //   181: invokeinterface 680 2 0
    //   186: pop
    //   187: goto -104 -> 83
    //   190: astore 6
    //   192: ldc_w 535
    //   195: new 569	java/lang/StringBuilder
    //   198: dup
    //   199: ldc_w 975
    //   202: invokespecial 573	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   205: aload 6
    //   207: invokevirtual 464	java/lang/Exception:getMessage	()Ljava/lang/String;
    //   210: invokevirtual 578	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   213: invokevirtual 579	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   216: invokestatic 469	com/iknow/util/Loger:e	(Ljava/lang/String;Ljava/lang/String;)V
    //   219: goto -119 -> 100
    //   222: aload_3
    //   223: aload 10
    //   225: invokestatic 973	com/iknow/db/MessageTable:parseMessage	(Landroid/database/Cursor;)Lcom/iknow/xmpp/service/Message;
    //   228: invokeinterface 680 2 0
    //   233: pop
    //   234: goto -78 -> 156
    //   237: astore 9
    //   239: ldc_w 535
    //   242: new 569	java/lang/StringBuilder
    //   245: dup
    //   246: ldc_w 975
    //   249: invokespecial 573	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   252: aload 9
    //   254: invokevirtual 464	java/lang/Exception:getMessage	()Ljava/lang/String;
    //   257: invokevirtual 578	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   260: invokevirtual 579	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   263: invokestatic 469	com/iknow/util/Loger:e	(Ljava/lang/String;Ljava/lang/String;)V
    //   266: goto -93 -> 173
    //
    // Exception table:
    //   from	to	target	type
    //   53	100	190	java/lang/Exception
    //   175	187	190	java/lang/Exception
    //   126	173	237	java/lang/Exception
    //   222	234	237	java/lang/Exception
  }

  public int geteRosterItemSubscribeMode(String paramString)
  {
    int i = 0;
    Object[] arrayOfObject = new Object[4];
    arrayOfObject[0] = "subscribe_mode";
    arrayOfObject[1] = "xmpp_roster";
    arrayOfObject[2] = "jid";
    arrayOfObject[3] = paramString;
    String str = String.format("select %s from %s where %s='%s'", arrayOfObject);
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    if (localCursor.getCount() > 0)
    {
      localCursor.moveToNext();
      i = localCursor.getInt(localCursor.getColumnIndex("subscribe_mode"));
    }
    localCursor.close();
    return i;
  }

  public List<QingBo> getsubscribeQingboList(String paramString, int paramInt1, int paramInt2)
  {
    Iterator localIterator;
    ArrayList localArrayList = new ArrayList();
    List localList = getSubscribeTags(paramString);
    if (localList != null)
      localIterator = localList.iterator();
    while (true)
    {
      if (!(localIterator.hasNext()))
      {
        localList.clear();
        return localArrayList;
      }
      localArrayList.addAll(getTagQingbo(0, 20, ((SubscribeTag)localIterator.next()).getTagName()));
    }
  }

  public boolean haveSubscribeTag(String paramString)
  {
    int i = 0;
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = "subscribe_tag";
    arrayOfObject[1] = "user_id";
    arrayOfObject[2] = paramString;
    String str = String.format("select count(*) from %s where %s='%s'", arrayOfObject);
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    if (localCursor.getCount() > 0)
    {
      localCursor.moveToNext();
      if (localCursor.getInt(0) > 0)
        i = 1;
    }
    localCursor.close();
    return i;
  }

  public boolean isFavoriteQingbo(QingBo paramQingBo)
  {
    int i = 0;
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = "favorite";
    arrayOfObject[1] = "id";
    arrayOfObject[2] = paramQingBo.getID();
    String str = String.format("select * from %s where %s='%s'", arrayOfObject);
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    if ((localCursor != null) && (localCursor.getCount() > 0))
      i = 1;
    localCursor.close();
    return i;
  }

  public boolean isFriendExist(String paramString)
  {
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = "roster";
    arrayOfObject[1] = "jid";
    arrayOfObject[2] = paramString;
    String str = String.format("select count(*) from %s where %s='%s'", arrayOfObject);
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    int i = 0;
    if (!(localCursor.moveToNext()));
    while (true)
    {
      do
      {
        localCursor.close();
        return i;
      }
      while (localCursor.getInt(0) <= 0);
      i = 1;
    }
  }

  public boolean isQingBoExist(String paramString1, int paramInt, String paramString2)
  {
    int i = 0;
    Object[] arrayOfObject = new Object[5];
    arrayOfObject[0] = "qingbo";
    arrayOfObject[1] = "id";
    arrayOfObject[2] = paramString1;
    arrayOfObject[3] = "page_type";
    arrayOfObject[4] = Integer.valueOf(paramInt);
    String str = String.format("select * from %s where %s='%s' and %s='%d'", arrayOfObject);
    Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str, null);
    if (localCursor.getCount() > 1)
      i = 1;
    localCursor.close();
    return i;
  }

  public boolean isStrangeWord(String paramString1, String paramString2)
  {
    int j;
    if (StringUtil.isEmpty(paramString1))
      j = 0;
    while (true)
    {
      return j;
      String str1 = paramString1.replace("'", "''");
      Object[] arrayOfObject = new Object[3];
      arrayOfObject[0] = "T_BD_STRANGEWORD";
      arrayOfObject[1] = "key";
      arrayOfObject[2] = str1;
      String str2 = String.format("select * from %s where %s='%s'", arrayOfObject);
      Cursor localCursor = this.mDBHepler.getReadableDatabase().rawQuery(str2, null);
      int i = 0;
      if ((localCursor != null) && (localCursor.getCount() > 0))
        i = 1;
      localCursor.close();
      j = i;
    }
  }

  public void removeFavoriteQingbo(QingBo paramQingBo)
  {
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = "favorite";
    arrayOfObject[1] = "id";
    arrayOfObject[2] = paramQingBo.getID();
    String str = String.format("delete from %s where %s='%s'", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  // ERROR //
  public void removeWord(List<Word> paramList)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 34	com/iknow/db/IKnowDataBase:mDBHepler	Lcom/iknow/db/IKnowDatabaseHelper;
    //   4: invokevirtual 480	com/iknow/db/IKnowDatabaseHelper:getWritableDatabase	()Landroid/database/sqlite/SQLiteDatabase;
    //   7: astore_2
    //   8: aload_2
    //   9: ifnonnull +4 -> 13
    //   12: return
    //   13: aload_1
    //   14: ifnull -2 -> 12
    //   17: aload_1
    //   18: invokeinterface 491 1 0
    //   23: ifeq -11 -> 12
    //   26: aload_2
    //   27: invokevirtual 611	android/database/sqlite/SQLiteDatabase:beginTransaction	()V
    //   30: iconst_0
    //   31: istore 5
    //   33: iload 5
    //   35: aload_1
    //   36: invokeinterface 491 1 0
    //   41: if_icmplt +22 -> 63
    //   44: aload_2
    //   45: invokevirtual 614	android/database/sqlite/SQLiteDatabase:setTransactionSuccessful	()V
    //   48: aload_2
    //   49: ifnull -37 -> 12
    //   52: aload_2
    //   53: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   56: aload_2
    //   57: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   60: goto -48 -> 12
    //   63: aload_1
    //   64: iload 5
    //   66: invokeinterface 495 2 0
    //   71: checkcast 402	com/iknow/data/Word
    //   74: astore 6
    //   76: iconst_1
    //   77: anewarray 77	java/lang/String
    //   80: astore 7
    //   82: aload 7
    //   84: iconst_0
    //   85: aload 6
    //   87: invokevirtual 410	com/iknow/data/Word:getKey	()Ljava/lang/String;
    //   90: aastore
    //   91: aload_2
    //   92: ldc_w 600
    //   95: ldc_w 1025
    //   98: aload 7
    //   100: invokevirtual 644	android/database/sqlite/SQLiteDatabase:delete	(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I
    //   103: pop
    //   104: iinc 5 1
    //   107: goto -74 -> 33
    //   110: astore 4
    //   112: ldc_w 604
    //   115: ldc_w 1027
    //   118: invokestatic 515	com/iknow/util/Loger:d	(Ljava/lang/String;Ljava/lang/String;)V
    //   121: aload_2
    //   122: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   125: aload_2
    //   126: ifnull -114 -> 12
    //   129: aload_2
    //   130: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   133: aload_2
    //   134: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   137: goto -125 -> 12
    //   140: astore_3
    //   141: aload_2
    //   142: ifnull +11 -> 153
    //   145: aload_2
    //   146: invokevirtual 607	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   149: aload_2
    //   150: invokevirtual 608	android/database/sqlite/SQLiteDatabase:close	()V
    //   153: aload_3
    //   154: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   26	48	110	java/lang/Exception
    //   63	104	110	java/lang/Exception
    //   26	48	140	finally
    //   63	104	140	finally
    //   112	125	140	finally
  }

  public void setAllRosterPresence(int paramInt)
  {
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = "xmpp_roster";
    arrayOfObject[1] = "presence";
    arrayOfObject[2] = Integer.valueOf(paramInt);
    String str = String.format("update %s set %s=%d", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void setSessionReaded(String paramString)
  {
    Object[] arrayOfObject = new Object[5];
    arrayOfObject[0] = "session";
    arrayOfObject[1] = "unread_count";
    arrayOfObject[2] = Integer.valueOf(0);
    arrayOfObject[3] = "roster_id";
    arrayOfObject[4] = paramString;
    String str = String.format("update %s set %s=%d where %s='%s'", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void updateFriendSubscribeMode(String paramString, int paramInt)
  {
    Object[] arrayOfObject = new Object[5];
    arrayOfObject[0] = "roster";
    arrayOfObject[1] = "subscribe_mode";
    arrayOfObject[2] = Integer.valueOf(paramInt);
    arrayOfObject[3] = "jid";
    arrayOfObject[4] = paramString;
    String str = String.format("update %s set %s=%s where %s='%s'", arrayOfObject);
    this.mDBHepler.getWritableDatabase().equals(str);
  }

  public void updateFriendsDistance(String paramString, float paramFloat)
  {
    Object[] arrayOfObject = new Object[5];
    arrayOfObject[0] = "near_by_friends";
    arrayOfObject[1] = "distance";
    arrayOfObject[2] = String.valueOf(paramFloat);
    arrayOfObject[3] = "jid";
    arrayOfObject[4] = paramString;
    String str = String.format("update %s set %s='%s' where %s='%s'", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void updateQingbo(QingBo paramQingBo)
  {
    ContentValues localContentValues = new ContentValues();
    localContentValues.put("date", Long.valueOf(paramQingBo.getCreateTime().getTime()));
    localContentValues.put("subject", paramQingBo.getSubject());
    localContentValues.put("title", paramQingBo.getTitle());
    localContentValues.put("hot", paramQingBo.getHot());
    localContentValues.put("favorite_count", paramQingBo.getFavoriteCount());
    localContentValues.put("comment_count", paramQingBo.getCommentCount());
    localContentValues.put("type", paramQingBo.getType().toString());
    localContentValues.put("thumbnail_url", paramQingBo.getThumbnailUrl());
    localContentValues.put("jid", paramQingBo.getAuthorID());
    localContentValues.put("user_name", paramQingBo.getAuthorName());
    localContentValues.put("tag", paramQingBo.getTags());
    SQLiteDatabase localSQLiteDatabase = this.mDBHepler.getWritableDatabase();
    String[] arrayOfString = new String[1];
    arrayOfString[0] = paramQingBo.getID();
    localSQLiteDatabase.update("qingbo", localContentValues, "id=?", arrayOfString);
  }

  public void updateRosterItemSubscribeMode(String paramString, int paramInt)
  {
    Object[] arrayOfObject = new Object[5];
    arrayOfObject[0] = "xmpp_roster";
    arrayOfObject[1] = "subscribe_mode";
    arrayOfObject[2] = Integer.valueOf(paramInt);
    arrayOfObject[3] = "jid";
    arrayOfObject[4] = paramString;
    String str = String.format("update %s set %s=%d where %s='%s'", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void updateRosterPresence(String paramString, int paramInt)
  {
    Object[] arrayOfObject = new Object[5];
    arrayOfObject[0] = "xmpp_roster";
    arrayOfObject[1] = "presence";
    arrayOfObject[2] = Integer.valueOf(paramInt);
    arrayOfObject[3] = "jid";
    arrayOfObject[4] = paramString;
    String str = String.format("update %s set %s=%d where %s='%s'", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void updateSession(int paramInt, String paramString1, String paramString2, String paramString3, boolean paramBoolean, Date paramDate)
  {
    int i = 1 + getTotalCount(paramString3);
    int j = getUnreadCount(paramString3);
    if (!(paramBoolean))
      ++j;
    Object[] arrayOfObject = new Object[14];
    arrayOfObject[0] = "subject";
    arrayOfObject[1] = paramString1;
    arrayOfObject[2] = "iknow_type";
    arrayOfObject[3] = Integer.valueOf(paramInt);
    arrayOfObject[4] = "total";
    arrayOfObject[5] = Integer.valueOf(i);
    arrayOfObject[6] = "unread_count";
    arrayOfObject[7] = Integer.valueOf(j);
    arrayOfObject[8] = "date";
    arrayOfObject[9] = Long.valueOf(paramDate.getTime());
    arrayOfObject[10] = "user_id";
    arrayOfObject[11] = paramString2;
    arrayOfObject[12] = "roster_id";
    arrayOfObject[13] = paramString3;
    String str = String.format("update session set %s='%s', %s=%d ,%s=%d ,%s=%d ,%s=%d where %s='%s' and %s='%s'", arrayOfObject);
    try
    {
      this.mDBHepler.getWritableDatabase().execSQL(str);
      return;
    }
    catch (Exception localException)
    {
      Loger.e("IKnowDataBase", "update Session Error:" + localException.getMessage());
    }
  }

  public void updateUserInfo(String paramString1, String paramString2, String paramString3)
  {
    Object[] arrayOfObject = new Object[4];
    arrayOfObject[0] = "iKnowUser";
    arrayOfObject[1] = paramString2;
    arrayOfObject[2] = paramString3;
    arrayOfObject[3] = paramString1;
    String str = String.format("update %s set %s='%s' where uid='%s';", arrayOfObject);
    this.mDBHepler.getWritableDatabase().execSQL(str);
  }

  public void updateWord(Word paramWord)
  {
    SQLiteDatabase localSQLiteDatabase = this.mDBHepler.getWritableDatabase();
    ContentValues localContentValues = getWordContentValues(paramWord);
    String[] arrayOfString = new String[1];
    arrayOfString[0] = paramWord.getKey();
    if (-1 == localSQLiteDatabase.update("T_BD_STRANGEWORD", localContentValues, "key=?", arrayOfString))
      Loger.d("IKStrangeWordTable", "UPDATE WORD FAIL!!!");
  }

  public void updateXmppMessageReadFlag(String paramString1, String paramString2)
  {
    Object[] arrayOfObject = new Object[5];
    arrayOfObject[0] = "XmppMessage";
    arrayOfObject[1] = "isRead";
    arrayOfObject[2] = paramString2;
    arrayOfObject[3] = "thread";
    arrayOfObject[4] = paramString1;
    String str = String.format("update %s set %s='%s' where %s='%s';", arrayOfObject);
    try
    {
      this.mDBHepler.getWritableDatabase().execSQL(str);
      return;
    }
    catch (Exception localException)
    {
      Loger.e("MessageTable", "update message read flag Error!" + localException.getMessage());
    }
  }
}